<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.hs.*,com.hs.pre.sys.validate.*"%>
<%@  page import="com.hs.pre.model.UserBean"%>
<%
	UserBean userBean = (UserBean) request.getSession().getAttribute(ParameterDic.USERSESSION);
%>
<LINK href="<%=path %>/app/css/popdiv.css" type=text/css rel=stylesheet>
<SCRIPT src="<%=path %>/app/js/popdiv.js" type=text/javascript></SCRIPT>
<SCRIPT src="<%=path %>/app/js/validate.js" type=text/javascript></SCRIPT>

<STYLE>
   #login{
     position: relative;
     display: none;
  top: 20px;
  left: 30px;
  background-color: #ffffff;
  text-align: center;
  border: solid 1px;
  padding: 10px;
  z-index: 1;
   }
 select.validation-failed, input.validation-failed, textarea.validation-failed {
    background: #FFFFFF url(/images/invalid_line.gif) repeat-x scroll center bottom;
    border: 1px solid #dd7870;
}

* html select.validation-failed {
    background-color: #dd7870;
}
</STYLE> 
<DIV id=gbar>
	<NOBR>
		<%
			if (userBean == null) {
		%><A class=gb1 href="javascript:openDiv('login');">登陆</A>
		<%
			} else{
				out.println("欢迎您,<b>"+ userBean.getUserName()+"</b>");
				%>
				
				<A href="javascript:" onclick=" javaScript:window.open('<%=basePath %>bardian.do?bardian=list','newwindow','height=500, width=700,resizable=yes')">个性设置</A>
			<% }
				
		%> 
		<DIV id=gbi>
			<A></A>
			<DIV class=gb2>
				<DIV class=gbd></DIV>
			</DIV>
			<A></A>
			<DIV class=gb2>
				<DIV class=gbd></DIV>
			</DIV>
			<A></A>
		</DIV>
	</NOBR>
</DIV>
<DIV class=gbh style="LEFT: 0px"></DIV>
<DIV class=gbh style="RIGHT: 0px"></DIV>
<DIV style="PADDING-BOTTOM: 2px" align=right>
	<%if(userBean != null){ %>
	 <A href="<%=path %>/app/index.jsp">管理</A> 
	 <A href="<%=path %>/login.do?sysPar=logout">退出</A> <%} %>
</DIV>
<DIV style="CLEAR: both; VISIBILITY: hidden"></DIV>
<CENTER>
	<div id="login"
		style="border: 1px solid rgb(204, 204, 204); padding: 10px; background-color: white; width: 400px;">
		<form id="formlogin" method="post" action="<%=path %>/login.do"
			onsubmit="return validate(this);">
			<input type="hidden" name="sysPar" value="login" />
			<span style="color: rgb(66, 116, 161);">请填写您的用户名和密码 </span>
			<br />
			<table width="100%" cellpadding="5">
				<tbody>
					<tr>
						<td width="110">
							<span style="color: red;">*</span> 用户名
						</td>
						<td>
							<input type="text" name="username" id="username" id="string"
								class="text required validation-failed" title=""  onkeydown="if(event.keyCode==13)if(formlogin.onsubmit())formlogin.submit();" />
						</td>

					</tr>
					<tr>
						<td>
							<span style="color: red;">*</span> 密码
						</td>
						<td>
							<input type="password" value="" id="string" name="password"
								id="password" class="required text validation-failed" title=""  onkeydown="if(event.keyCode==13)if(formlogin.onsubmit())formlogin.submit();" />
						</td>
					</tr>
					<tr>
						<td>
						</td>
						<td>
							<input type="checkbox" value="1" name="remember_me"
								id="remember_me" checked="checked" onkeydown="if(event.keyCode==13)if(formlogin.onsubmit())formlogin.submit();"/>
							自动登录
						</td>

					</tr>
					<tr>
						<td align="center" colspan="2">
							<input type="image" src="<%=path %>/app/images/login_button.jpg" />
							<a href="javascript:close();">关闭</a>
						</td>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
	<script type="text/javascript">
<!--
function fieldArray() {
	this.a1 = new Array("用户名：","username","String","false","10","","");
	this.a2 = new Array("密码：","password","String","false","10","","");
}
setLimit(formlogin);
//-->
</script>